import { request } from "../utils/request";
import type { ListDataItemType } from "../views/list";

export interface GetListApiParamsState {
  pageCode: number;
  pageSize: number;
  searchValue?: string;
  type?: string;
  minScore?: string;
  maxScore?: string;
}
export const getListApi = (params: GetListApiParamsState) => {
  return request.get("/list", { params: params });
};

export const deleteListApi = (id: string) => {
  return request.delete("/list", { params: { id } });
};
export const postListApi = (data: ListDataItemType) => {
  return request.post('/list', data)
};
export const putListApi = (data: ListDataItemType) => {
  return request.put('/list', data)
};
